package cn.itsource.pethome.org.mapper;

import cn.itsource.pethome.basic.mapper.BaseMapper;
import cn.itsource.pethome.org.domain.Product;
import cn.itsource.pethome.org.domain.ProductDetail;
import cn.itsource.pethome.org.query.ProductQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @description: 描述:
 * @date: 2020/8/9 14:20
 * @author: summer
 * version: 1.0
 */
public interface ProductMapper extends BaseMapper<Product> {

    List<Product> findAll(ProductQuery productQuery);

    Long findCountAll(ProductQuery productQuery);

    void delProduct(Long id);

    void batchDelProduct(@Param("ids") Long[] id);

    void save(Product product);

    void update(Product product);

    void saveDetal(ProductDetail productDetail);

    void updateDetal(ProductDetail detail);

    void delProductDetail(Long id);

    void batchDelProductDetail(@Param("ids") Long[] id);

    Product findById(Long id);
}
